﻿
@model QuizeDto

@section MainStyle{


    <!-- bradcam_area_start -->
    <div class="bradcam_area breadcam_bg overlay2">
        <h3>Edit Quize</h3>
    </div>
    <!-- bradcam_area_end -->

}
<style>
    .popup_box {
        background: #85399ecf;
        display: inline-block;
        width: 558px;
        padding: 60px 40px;
        border-radius: 5px;
        z-index: 9;
    }
</style>
<div class="mb-5 mt-5 row">
    <form asp-action="Edit" enctype="multipart/form-data" id="createquize" style="margin:auto">
        <div class="popup_box ">
            <div class="popup_inner">
                <div class="logo text-center">
                    <a href="#">
                        <img src="img/form-logo.png" alt="">
                    </a>
                </div>
                <h3 style="text-align:center">Edit Quize</h3>

                <div class="row">
                    <div class="col-xl-12 col-md-12 mb-5">
                        <div class="input-group">
                            <input asp-for="File" style="display:none" />
                            <div class="custom-file">
                                <input asp-for="FileQuestion" type="file" class="custom-file-input" id="inputGroupFile01"
                                      >
                                <label class="custom-file-label" for="inputGroupFile01">@Model.File</label>
                            </div>
                        </div>
                    </div>
                    <span asp-validation-for="FileQuestion" class="text-danger"></span>
                    <div class="col-xl-12 col-md-12 mb-5">
                        <div class="input-group">
                            <input asp-for="Fileanswer" style="display:none" />
                            <div class="custom-file">
                                <input asp-for="FileAnswerForm" type="file" class="custom-file-input" id="inputGroupFile02"
                                       >
                                <label class="custom-file-label" for="inputGroupFile02">@Model.Fileanswer</label>
                            </div>
                        </div>
                    </div>
                    <span asp-validation-for="FileAnswerForm" class="text-danger"></span>

                    <div class="col-xl-12 col-md-12">
                        <label style="color:white;font-size:20px" asp-for="TimeStart"></label>
                        <input asp-for="TimeStart" id="TimeStart" />
                        <span asp-validation-for="TimeStart" class="text-danger"></span>
                    </div>
                    <div class="col-xl-12 col-md-12">
                        <label style="color:white;font-size:20px" asp-for="TimeEnd"></label>
                        <input asp-for="TimeEnd" id="TimeEnd" />
                        <span asp-validation-for="TimeEnd" class="text-danger"></span>
                    </div>
                    <div class="col-xl-12 col-md-12">
                        <label style="color:white;font-size:20px">Duration</label>
                        <div class="row">
                            <div class="col-6">
                                <label style="color:white;font-size:20px">Hour</label>
                                <input asp-for="Hour" min="0" placeholder="00" />
                            </div>
                            <div class="col-6">
                                <label style="color:white;font-size:20px">Minute</label>
                                <input asp-for="Minute" min="0" placeholder="00" />
                            </div>
                        </div>
                        <span asp-validation-for="Hour"></span>
                    </div>
                    <div class="col-xl-12 col-md-12">
                        <label style="color:white;font-size:20px" asp-for="Description"></label>
                        <input asp-for="Description" id="TimeEnd" />
                        <span asp-validation-for="Description" class="text-danger"></span>
                    </div>
                    <div class="form-group" style="display:none">
                        <input asp-for="GroupId" class="form-control" />
                    </div>
                    <div class="form-group" style="display:none">
                        <input asp-for="Id" class="form-control" />
                    </div>
                    <div class="form-group" style="display:none">
                        <input asp-for="Id" class="form-control" />
                    </div>
                    <div class="col-xl-12">

                        <button type="submit" id="submit" class="boxed_btn_orange">Save</button>
                    </div>
                </div>


            </div>
        </div><button title="Close (Esc)" type="button" class="mfp-close">×</button>
    </form>
</div>




@section Scripts {
    @{await Html.RenderPartialAsync("_ValidationScriptsPartial");}
<script>
    $('#inputGroupFile01,#inputGroupFile02').on('change', function () {
        //get the file name
        console.log(this);
        var fileName = $(this).val();
        //replace the "Choose a file" label
        $(this).next('.custom-file-label').html(fileName);
    })
    $(document).ready(() => {

        $("#inputGroupFile01").rules("remove", "required");
        $("#inputGroupFile02").rules("remove", "required");

    });


</script>
}

